package javaStudy.io流;

import java.io.*;

public class 字符流复制java文件 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("copy1.java"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("copy2.java"));
        String line;
        while ((line= br.readLine())!=null){
            bw.write(line);
            bw.newLine();
            bw.flush();
        }
    }
}
